/*
 * Copyright 2010 Marcin Blazejewski
 *
 * This file is part of Nofate.
 *
 * Nofate is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Nofate is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Nofate. If not, see <http://www.gnu.org/licenses/>.
 *
 */


#ifndef THING_H_
#define THING_H_

#include "attribute.hpp"

#include <list>
#include <map>
#include <vector>
#include <string>

#define TH_TYPE_THING                     0
#define TH_TYPE_TERRAIN                   1
#define TH_TYPE_CREATURE                  2

using namespace std;

class Thing {
public:
    string              name;
    char                type;
    int                 x, y;
    char                alpha;
    char                ch;
    int                 fg;
    class AreaMap       *area;
    
    map<string,Attr*>   attributes;

    Thing(const char *_name, char alpha, char ch, int fg);
    virtual ~Thing();
};


class Creature : public Thing {
private:
    void                      init_container(int slot_id);
public:
    class MapView             *mv;
    char                      busy;
    
    // places for inventory: backpacks, eq slots, hands
    vector<Thing*>      containers;

    Creature(const char *n, char alpha, char ch, int fg);
    virtual ~Creature();
};


#endif
